  <!DOCTYPE html>
<html>
	<head>
		<title>Sub-Grid in a DataTable - Inline Data</title>
		<link rel="stylesheet" href="../../../../codebase/webix.css" type="text/css" charset="utf-8">
		<script src="../../../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>

		<link rel="stylesheet" type="text/css" href="../../common/samples.css">
		<script src="../../common/testdata.js" type="text/javascript" charset="utf-8"></script>
        <style type="text/css">
        .multiline{
            line-height: 30px !important;
        }
        </style>
	</head>
	<body>
		<div class='header_comment'>Sub-Grid in a DataTable - Inline Data</div>
		<div id="testA"></div>

		<script type="text/javascript" charset="utf-8">
		webix.ready(function(){
			webix.ui({
				container:"testA",
				view:"datatable",
				subview:{
					borderless:true,
					view:"datatable",
					headerRowHeight:28,
					columns:[
						{ id:"Outlet", sort:"string", fillspace:true },
						{ id:"January" },
						{ id:"February" },
						{ id:"March" }
					],
					scrollX:false,
					autoheight:true
				},
				on:{
					onSubViewCreate:function(view, item){
						view.parse(item.outlets);
					}
				},
				columns:[
					{ id:"title",	header:"Title", sort:"string",
						template:"{common.subrow()} #title#", width:220 },
					{ id:"year",	header:"Year", 		width:100, sort:"int"},
					{ id:"votes",	header:"Votes", 	width:100,	sort:"int"}
				],
				autoheight:true,
				autowidth:true,
				data:[
					{ id:1, title:"The Shawshank Redemption", year:1994, votes:678790, outlets:[
						{ Outlet:"North", January:100, February:230, March:180 },
						{ Outlet:"West", January:70, February:120, March:160 },
					]},
					{ id:2, title:"The Godfather", year:1972, votes:511495, outlets:[
						{ Outlet:"North", January:453, February:322, March:732 },
						{ Outlet:"West", January:22, February:556, March:123 },
					]},
					{ id:3, title:"The Godfather: Part II", year:1974, votes:319352, outlets:[
						{ Outlet:"North", January:232, February:489, March:290 },
						{ Outlet:"West", January:92, February:83, March:290 },
					]}
				]
			});
		});			
		</script>
	</body>
</html>